package com.ruoyi.store.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.store.api.factory.RemoteStockInFallbackFactory;
import com.ruoyi.system.api.domain.store.StockOut;
import com.ruoyi.system.api.dto.StockInDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;

/**
 *
 */
@FeignClient(contextId = "remoteStockInXService", value = ServiceNameConstants.STORE_SERVICE ,fallbackFactory = RemoteStockInFallbackFactory.class)
public interface RemoteStockInXService {

    @PostMapping("/stockIn/getListInStockInCodeList")
    public R<List<StockInDTO>> getListInStockInCodeList(@RequestBody List<String> codeList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/stockIn/updateStockInPaidAmount")
    public R<Boolean> updateStockInPaidAmount(@RequestParam("code") String code,
                                              @RequestParam("paidAmount") BigDecimal paidAmount,
                                              @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
